package cn.aitrox.ry.service.alg.config;

import cn.aitrox.ry.common.config.JsonMessageConverter;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;

import java.util.List;

@Configuration
public class SpringMvcConfig extends WebMvcConfigurationSupport {

//    @Autowired
//    private UserInterceptor userInterceptor;

    @Override
    public void extendMessageConverters(List<HttpMessageConverter<?>> converters) {
        converters.add(new JsonMessageConverter());
    }

//    @Override
//    public void addInterceptors(InterceptorRegistry registry) {
//        registry.addInterceptor(userInterceptor).addPathPatterns("/**");
//        super.addInterceptors(registry);
//    }
}
